// 导入axios
import axios from 'axios'

let http ={

    dealUrl:function(url){
        if (process.env.NODE_ENV === 'production'){
            // 生产环境
            return '/lcx/walle'+url;
        }
        return '/walle' + url;
    },

    get:function(url, param){
        return axios.get(this.dealUrl(url), param);
    },

    post:function(url, data){
        return axios.post(this.dealUrl(url), data);
    }
};

export default http;
